/**
 * Created by Gibbs on 2021/1/31.
 * Copyright (c) 2021 Gibbs. All rights reserved.
 */

#ifndef GPLAYER_COMMONUTILJNI_H
#define GPLAYER_COMMONUTILJNI_H

#include <jni.h>
#include <string>

class CommonUtilJni {
public:
    static void init();

    static std::string findDecoderForFormat(const char *format);

    static int getMediaCodecSampleFmt(int fmt);

private:
    static jclass playerClass;
    static jmethodID findDecoderForFormatMethod;
    static jmethodID getMediaCodecSampleFmtMethod;
};


#endif //GPLAYER_COMMONUTILJNI_H
